<template>
	<view :style="{'background-color':dataobj.tabsequence?'#f8f8f8':'#fff'}" style="font-size:14px;color:#444; padding: 8px 18px; display: flex;flex-direction: row;justify-content: space-between;">
		<view style="display: flex;align-items: center;" :style="{'fontSize':clientType=='pda'?'20px':'14px'}">{{dataobj.colText}} 
		<view v-if="dataobj.tag_isNotEmpty" style="color: #F55C23;font-size: 6px;" class="iconfont icon-jiufuqianbaoicon14"></view> </view>
		<view style="text-align: right;color: #666;" :style="{'fontSize':clientType=='pda'?'20px':'14px'}"> 
			<picker :mode="dataobj.colType=='datetime'?'date':'date'" :disabled="!isaddedit && dataobj.tabsequence==0" :value="dataobj.colValue" :start="dataobj.starts" :end="dataobj.ends" @change="bindDateChange($event)">
				<view class="uni-input" style="color: #aaa;">{{dataobj.colValue?dataobj.colValue:dataobj.placeholder}}</view>
			</picker>
		</view>
	</view>
</template>


<script>
	export default {
		props:{
			dataobj:{
				type:Object
			},
			listitemindex:{
				type:Number
			},
			listindex:{
				type:Number
			},
			listblockindex:{
				type:Number
			},
			divArea:{
				type:String
			},
			pagename:{
				type:String
			},
			isaddedit:{
				type:Boolean
			},
			clientType:{
				type:String,
				default(){
					return ""
				}
			}
		},
		
		mounted:function(res){
		},
		
		methods:{
			bindDateChange(event){
				var that = this
				that.dataobj.colValue =  event.detail.value
				that.dataobj.value =  event.detail.value
				that.dataobj.ismodified =  true
				uni.$emit("updatelist", that.divArea, that.listindex, that.listblockindex, that.listitemindex, that.dataobj,this.pagename)
			},
		},
	}
</script>

<style>
</style>
